package com.demo.gulimall.order.feign;

import com.demo.gulimall.common.to.SkuHasStockVo;
import com.demo.gulimall.common.utils.R;
import com.demo.gulimall.order.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author Chen Yuan
 * @create 2023-06-27  14:47
 */
@FeignClient("mall-ware")
public interface WareFeignService {

	@PostMapping("/ware/waresku/hasstock")
	public R<List<SkuHasStockVo>> getSkuHasStock(@RequestBody List<Long> skuIds);

	@GetMapping(value = "/ware/wareinfo/fare")
	public R<FareVo> getFare(@RequestParam("addrId") Long addrId);

	@PostMapping("/ware/waresku/lock/order")
	public R orderLockStock(@RequestBody SkuLockStockVo lockStockVo);
}
